/*    */ package com.yss.sofa.cml.design;
/*    */ 
/*    */ import com.yss.sofa.cml.CellElement;
/*    */ import com.yss.sofa.cml.ColumnGroup;
/*    */ import com.yss.sofa.cml.Row;
/*    */ import com.yss.sofa.cml.Visitor;
/*    */ import com.yss.sofa.cml.type.LayoutEnum;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ 
/*    */ public class DesignRow
/*    */   implements Row
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */   protected List<CellElement> children;
/*    */   private int height;
/*    */   private LayoutEnum layout;
/*    */   private boolean detached;
/*    */   private DesignColumnGroup columnGroup;
/*    */ 
/*    */   public CellElement[] getElements()
/*    */   {
/* 26 */     return getElements(this.children);
/*    */   }
/*    */ 
/*    */   public static CellElement[] getElements(List<CellElement> children) {
/* 30 */     if (children == null) {
/* 31 */       return null;
/*    */     }
/* 33 */     CellElement[] elements = new CellElement[children.size()];
/* 34 */     children.toArray(elements);
/* 35 */     return elements;
/*    */   }
/*    */ 
/*    */   public void addCell(CellElement cell) {
/* 39 */     if (this.children == null) {
/* 40 */       synchronized (this) {
/* 41 */         this.children = new ArrayList();
/*    */       }
/*    */     }
/* 44 */     this.children.add(cell);
/*    */   }
/*    */ 
/*    */   public int getHeight()
/*    */   {
/* 49 */     return this.height;
/*    */   }
/*    */ 
/*    */   public void setHeight(int height) {
/* 53 */     this.height = height;
/*    */   }
/*    */ 
/*    */   public void setHeight(int height, LayoutEnum layout) {
/* 57 */     setHeight(height);
/* 58 */     setLayout(layout);
/*    */   }
/*    */ 
/*    */   public LayoutEnum getLayout()
/*    */   {
/* 63 */     return this.layout;
/*    */   }
/*    */ 
/*    */   public void setLayout(LayoutEnum layout) {
/* 67 */     this.layout = layout;
/*    */   }
/*    */ 
/*    */   public void visit(Visitor visitor)
/*    */   {
/* 72 */     visitor.visitRow(this);
/*    */   }
/*    */ 
/*    */   public boolean isDetached()
/*    */   {
/* 77 */     return this.detached;
/*    */   }
/*    */ 
/*    */   public void setDetached(boolean detached) {
/* 81 */     this.detached = detached;
/*    */   }
/*    */ 
/*    */   public void setColumnGroup(DesignColumnGroup columnGroup) {
/* 85 */     this.columnGroup = columnGroup;
/*    */   }
/*    */ 
/*    */   public ColumnGroup getColumnGroup() {
/* 89 */     return this.columnGroup;
/*    */   }
/*    */ }

/* Location:           X:\repository\com\yss\sofa\cml\cml-api\1.1.0\cml-api-1.1.0.jar
 * Qualified Name:     com.yss.sofa.cml.design.DesignRow
 * JD-Core Version:    0.6.0
 */